<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core" xmlns:t="http://myfaces.apache.org/tomahawk"
                template="/WEB-INF/templates/template-principal.xhtml">

    <ui:define name="conteudo">

        <div>

            <h1>Cadastrar Local Evento</h1>

            <h:messages />

            <t:saveState value="#{localEventoController.state}" />

            <h:form id="frmSaveUpdateLocalEvento" styleClass="form_settings">
                <p>
                    <span>#{msg['localevento.local']}:</span>
                    <h:inputText id="txtLocal"
                                 label="#{msg['localevento.local']}"
                                 value="#{localEventoController.localEvento.local}" required="true" />
                </p>

                <p>
                    <span>#{msg['localevento.telefone']}:</span>
                    <h:inputText id="txtTelefone"
                                 label="#{msg['localevento.telefone']}"
                                 value="#{localEventoController.localEvento.telefone}" required="true"/>
                </p>

                <p>
                    <span>#{msg['localevento.capacidade']}:</span>
                    <h:inputText id="txtCapacidade" label="#{msg['localevento.capacidade']}"
                                 value="#{localEventoController.localEvento.capacidade}" required="true">
                        <f:convertNumber integerOnly="true  "/>
                    </h:inputText>
                </p>

                <p>
                    <h:commandButton id="btnSaveLocalEvento"
                                     value="#{msg['salvar']}"
                                     styleClass="submit"
                                     action="#{localEventoController.saveOrUpdate}"
                                     rendered="#{localEventoController.state == 'CREATE'}" />

                    <h:commandButton id="btnCancelLocalEvento"
                                     immediate="true"
                                     styleClass="submit"
                                     value="#{msg['cancelar']}"/>
                </p>
            </h:form>

        </div>

    </ui:define>

</ui:composition>